<div id="page-title" class="clearfix">		
	<ul class="breadcrumb">
		<li>
			<?php
echo CHtml::link('Home',array('/site/index'));
?>
			<span class="divider">/</span>
		</li>
		<li>
			<?php
echo CHtml::link('Transpackage',array('admin'));
?>
			<span class="divider">/</span>
		</li>
		<li class="active">Transactions ( <?php echo CHtml::link($member->username,array('/member/view','id'=>$member->id));?> )</li>
	</ul>		
</div> <!-- /.page-title -->
<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('transpackage-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<link href="<?php echo Yii::app()->request->baseUrl; ?>/js/plugins/datatables/DT_bootstrap.css" rel="stylesheet"/>
<link href="<?php echo Yii::app()->request->baseUrl; ?>/js/plugins/responsive-tables/responsive-tables.css" rel="stylesheet"/>
<link href="<?php echo Yii::app()->request->baseUrl; ?>/js/plugins/lightbox/themes/evolution-dark/jquery.lightbox.css" rel="stylesheet"/>   
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/plugins/datatables/jquery.dataTables.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/plugins/datatables/DT_bootstrap.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/plugins/responsive-tables/responsive-tables.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/plugins/lightbox/jquery.lightbox.min.js"></script>

<div id="horizontal" class="widget widget-form">
	<div class="widget-header">	      				
		<h3>
		     <i class="icon-search"></i>
<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
		</h3>	
	</div> <!-- /widget-header -->
	<div class="widget-content search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
	</div><!-- search-form -->
</div>
<div class="widget">
	<div class="widget-toolbar">
	<?php echo CHtml::link('<i class="icon-step-backward"></i> Back',array('/member/admin'),array('class'=>'btn btn-primary')); ?>
	<?php echo CHtml::link('<i class="icon-credit-card"></i> Transaction(Package)',array('/transpackage/admin','mid'=>$member->id),array('class'=>'btn btn-inverse')); ?>
	<?php echo CHtml::link('<i class="icon-film"></i> Transaction(Film)',array('/transaction/admin','mid'=>$member->id),array('class'=>'btn btn-primary')); ?>
	<?php echo CHtml::link('<i class="icon-play-circle"></i> Transaction(Clip)',array('/transclip/admin','mid'=>$member->id),array('class'=>'btn btn-primary')); ?>
	</div>
	<!-- /.widget-toolbar -->
</div>
<div class="widget widget-table">
	<div class="widget-header">						
		<h3>
			<i class="icon-th-list"></i>
			Manage Transaction(Package)						
		</h3>
	</div> <!-- /widget-header -->
	<div class="widget-content">
	<?php $form=$this->beginWidget('CActiveForm', array(
	    'enableAjaxValidation'=>true,
	)); ?>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'transpackage-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'summaryText'=>'',
	'htmlOptions'=>array('class'=>'table table-striped table-bordered responsive'),
	'pagerCssClass'=>'pagination pagination-centered',
	'columns'=>array(
		'id',
		array(
            'name'=>'Member',
            'value'=>'$data->member[0]["username"]',
			'htmlOptions'=>array("width"=>"18%"),
        ),
// 		array(
//             'name'=>'Package',
//             'value'=>'$data->package[0]["name"]',
// 			'value'=>'CHtml::link("$data->package[0]["name"]",array("/package/update","id"=>"$data->package[0]["id"]"))',
// 			'type'=>'raw',
// 			'htmlOptions'=>array("width"=>"18%"),
//         ),
		array(
				'header'=>'Package',
				'name'=>'pid',
				'type'=>'raw',
				'value'=>'CHtml::link("$data->pid",array("/package/update","id"=>"$data->pid"))',
		),
		'startdate',
		'enddate',
		'price',
		/*
		'active',
		*/
		array(
			'header'=>'Action',
			'class'=>'CButtonColumn',
			'buttons'=>array(
				'delete' => array
		        (
		            'label'=>'Delete',
		        	'imageUrl'=>Yii::app()->request->baseUrl.'/images/icons/delete-file-icon_24.png',
		        ),
		        'update' => array
		        (
		            'label'=>'Update',
		        	'imageUrl'=>Yii::app()->request->baseUrl.'/images/icons/table-edit-icon_24.png',
					'visible'=>'false'
		        ),
		        'view'=>array(
		        	'visible'=>'false'
		        ),
		     ),
		),
	),
)); ?>
<?php $this->endWidget(); ?>	</div> <!-- /widget-content -->
</div> <!-- /widget -->